<template>
  <div>
    <el-button @click="handler">点击1</el-button>
    <el-button @click="handler2">点击2</el-button>
  </div>
</template>

<script>
  export default {
    methods: {
      handler() {
        this.$bus.$emit('detail', {
          type: 'Test1',
          id: 1
        })
      },
      handler2() {
        this.$bus.$emit('detail', {
          type: 'Test2',
          id: 2
        })
      }
    },
  }
</script>

<style lang="scss" scoped>

</style>